//
//  LineManageTableViewCell.m
//  YCSearchDemo
//
//  Created by huyuchen on 2018/3/3.
//  Copyright © 2018年 Hyc. All rights reserved.
//

#import "LineManageTableViewCell.h"

@interface LineManageTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *statusLabel;

@end
@implementation LineManageTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    [self showArrowWithImage:nil];
    [self showBottomLineWithPaddingX:15 color:nil];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(LineModel *)model {
    _model = model;
    self.nameLabel.text = model.line_name;
    [self setLineStatus:model.status];
}

- (void)setLineStatus:(LineWorkingStatus)status {
    switch (status) {
        case LineWorkingStatusWorking:
        {
            self.statusLabel.text = @"施工中";
            self.statusLabel.textColor = Color_LineWorking;
            break;
        }
        case LineWorkingStatusFinish:
        {
            self.statusLabel.text = @"已完工";
            self.statusLabel.textColor = Color_LineFinish;
            break;
        }
        case LineWorkingStatusTodo:
        {
            self.statusLabel.text = @"未开工";
            self.statusLabel.textColor = Color_LineTodo;
            break;
        }
        default:
            break;
    }
}

@end
